<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="layout" content="main" />
	<title>Inserir Item</title>
</head>
<body>
	<h1>Inserir Item</h1>
	
	<g:hasErrors bean="${itemInstance}">
		<div class="errors">
			<g:renderErrors bean="${itemInstance}" as="list" />
		</div>
	</g:hasErrors>
	
	<g:form enctype="multipart/form-data">
		<p><label for="nome">Nome: </label> <g:textField name="nome" maxlength="50" value="${itemInstance?.nome}" /></p>
		<p><label for="categoria">Categoria: </label> <g:select name="categoria.id" from="${br.zeus.lemenu.Categoria.list()}" optionKey="id" value="${itemInstance?.categoria?.id}" /></p>
		<p><label for="descricao">Descricao: </label> <g:textField name="descricao" maxlength="250" value="${itemInstance?.descricao}" /></p>
		<p><label for="preco">Preco</label> <g:textField name="preco" value="${fieldValue(bean: itemInstance, field: 'preco')}" /></p>
		<p><label for="foto">Foto</label> <input type="file" name="arquivo" /></p>
		
		<p><g:actionSubmit value="Inserir" action="save"/></p>
	</g:form>
</body>
</html>
